home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 15720 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.2 KB  |  36 lines

  1. Newsgroups: comp.lang.c
  2. Path: netcom.com!smryan
  3. From: smryan@netcom.com (@#$%!?!)
  4. Subject: Re: Stylistic Concerns with Header Files
  5. Message-ID: <smryanDq6LFq.I57@netcom.com>
  6. Organization: The Programmer formerly known as S M Ryan
  7. X-Newsreader: TIN [version 1.2 PL1]
  8. References: <4lb9bl$amo@wormer.fn.net>
  9. Date: Sat, 20 Apr 1996 22:07:02 GMT
  10. Sender: smryan@netcom4.netcom.com
  11.  
  12. : /* Untested code; call this "foo.h" */
  13.  
  14. : #ifndef _FOO_H_
  15. : #define _FOO_H_
  16.  
  17. #include "bar.h"    /* conditionally include bar.h if we need it.    */
  18.  
  19. : typedef struct price_tag
  20. : {
  21.  
  22.  
  23.  
  24. : My question is: how can you keep the two header files seperate, and
  25. : still get away with not having header file dependancies or inclusion
  26. : orders?
  27.  
  28. If you bracket each header file for conditional inclusion, you can freely
  29. include one header file inside another: the first occurence will expand
  30. and all others will be ignored.
  31. -- 
  32. The Queen who loves, the Queen of life,    | smryan@netcom.com  PO Box 1563
  33. the Queen who straits, the Queen of strife;|          Cupertino, California
  34. with gasp of death or gift of breath       | (xxx)xxx-xxxx            95015
  35. she brings the choice of birth or knife.   |         I don't use no smileys
  36.